package com.hyb.hybmodulesblog.service.impl;

import java.util.List;

import com.hyb.hybmodulesblog.domain.TribeUserVo;
import com.ruoyi.system.api.domain.Tribe;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hyb.hybmodulesblog.mapper.TribeUserMapper;
import com.hyb.hybmodulesblog.domain.TribeUser;
import com.hyb.hybmodulesblog.service.ITribeUserService;

/**
 * 用户部落关联表增删改查Service业务层处理
 * 
 * @author hyb
 * @date 2023-03-11
 */
@Service
public class TribeUserServiceImpl implements ITribeUserService 
{
    @Autowired
    private TribeUserMapper tribeUserMapper;

    /**
     * 查询用户部落关联表增删改查
     * 
     * @param tribeId 用户部落关联表增删改查主键
     * @return 用户部落关联表增删改查
     */
    @Override
    public TribeUser selectTribeUserByTribeId(Long tribeId)
    {
        return tribeUserMapper.selectTribeUserByTribeId(tribeId);
    }

    /**
     * 查询用户部落关联表增删改查列表
     * 
     * @param tribeUser 用户部落关联表增删改查
     * @return 用户部落关联表增删改查
     */
    @Override
    public List<TribeUser> selectTribeUserList(TribeUser tribeUser)
    {
        return tribeUserMapper.selectTribeUserList(tribeUser);
    }

    /**
     * 新增用户部落关联表增删改查
     * 
     * @param tribeUser 用户部落关联表增删改查
     * @return 结果
     */
    @Override
    public int insertTribeUser(TribeUser tribeUser)
    {
        return tribeUserMapper.insertTribeUser(tribeUser);
    }

    /**
     * 修改用户部落关联表增删改查
     * 
     * @param tribeUser 用户部落关联表增删改查
     * @return 结果
     */
    @Override
    public int updateTribeUser(TribeUser tribeUser)
    {
        return tribeUserMapper.updateTribeUser(tribeUser);
    }

    /**
     * 批量删除用户部落关联表增删改查
     * 
     * @param tribeIds 需要删除的用户部落关联表增删改查主键
     * @return 结果
     */
    @Override
    public int deleteTribeUserByTribeIds(Long[] tribeIds)
    {
        return tribeUserMapper.deleteTribeUserByTribeIds(tribeIds);
    }

    /**
     * 删除用户部落关联表增删改查信息
     * 
     * @param tribeId 用户部落关联表增删改查主键
     * @return 结果
     */
    @Override
    public int deleteTribeUserByTribeId(Long tribeId)
    {
        return tribeUserMapper.deleteTribeUserByTribeId(tribeId);
    }

    @Override
    public List<TribeUserVo> selectTribeUserDetail(Long tribeId) {
        return tribeUserMapper.selectTribeUserDetail(tribeId);
    }

    @Override
    public List<Tribe> selectUserTribes(Long userId) {
        return tribeUserMapper.selectUserTribes(userId);
    }
}
